<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>ChartViewer.setUpdateInterval</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="ChartViewer.htm">ChartViewer</a>.<wbr>setUpdateInterval</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
public void setUpdateInterval(int interval)
</div>
<p class="heading2">Description</p>
<div class="content">
Sets the minimum gap interval between two ViewPortChanged events in milliseconds.<br><br>
Some GUI designs may be capable of generate a lot of <a href="ViewPortListener.viewPortChanged.htm">ViewPortListener.viewPortChanged</a> events rapidly. For example, an external scroll bar may update the viewport and call <a href="ChartViewer.updateViewPort.htm">ChartViewer.updateViewPort</a> rapidly and repeatedly when it is scrolling. As the chart is usually updated in the main GUI thread, updating too rapidly without a gap interval in between may cause other GUI elements to become sluggish.<br><br>
This method specifies the minimum gap interval between two ViewPortChanged events. The default is 20ms.<br><br>
If a ViewPortChanged event needs to be fired during the gap interval, the event will be delayed and fired after the gap interval.<br><br>
If multiple ViewPortChanged events needs to be fired during the gap interval, they will be merged into one event, and be fired after the gap interval.
</div>
<p class="heading2">Arguments</p>
<div class="content">
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Argument</th><th width="19%">Default</th><th>Description</th>
</tr>
<tr>
<td>interval</td><td>(Mandatory)</td><td>The minimum gap interval between two ViewPortChanged events in milliseconds.</td>
</tr>
</table>
</div>
</div>
<p class="heading2">Return Value</p>
<div class="content">
None
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
